read_dta
{haven}
Read a .dta file (Stata data)
min
{base}
Get minimum of a vector
summarize
NA
write_dta
NA
recode
{dplyr}
Recode a variable
max
{base}
Get maximum of a vector
mutate
{dplyr}
Modify/create a column in a data frame
hist
{graphics}
Plot a simple histogram
t.test
{stats}
Performs one and two sample t-tests on vectors of data.
boxplot
{graphics}
Plot a simple box plot
ungroup
{dplyr}
Resolve grouping created with “group_by”
with
{base}
evaluate expression in the context of a data frame
spread
{tidyr}
Spread a key-value pair across multiple columns
summarise
{dplyr}
collapse the dataset to a summary statistic. Usually used with group_by()
arrange
{dplyr}
Sort values of data frame according to a variable/combination of varaibles
c
{base}
Combine values/vectors into a vector
save
{base}
Writes an external representation of R objects to the specified file.
filter
{dplyr}
Filter out rows of a data frame according to logical vector
setwd
{base}
Set Working Directory
sd
{stats}
Get standard deviation of a vector
head
{utils}
Show first 5 rows of a data frame
is.na
{base}
Check if a value is NA/elements of vector are NA
n
{dplyr}
The number of observations in the current group.
table
{base}
Obtain frequency table of a variable/cross-tabulation of two variables
geom_histogram
{GGPLOT2}
Generates a histogram
ggplot
{GGPLOT2}
Create a ggplot graph
levels
{base}
Get levels of a factor
median
{stats}
Get median of a vector
read_excel
{readxl}
Read an Excel file
prop.test
{stats}
Test of Equal or Given Proportions
summary
{base}
Obtain summary statistics or detailed regression output
ordered
{dplyr}
Create an ordered factor
library
{base}
Load an R package
var
{stats}
Calculate variance
group_by
{dplyr}
Group tibble/data.frame by a factor variable. All further tidyverse operations are performed group-wise
as.character
{base}
Coerce a vector to character
ifelse
{base}
Return a or b depending on the value of test
names
{base}
Retrieve names of a list/vector
range
{base}
Return range of values
str
{utils}
Get the structure of an R object
factor
{base}
Create a factor
seq
{base}
Create a sequence
complete.cases
{stats}
Find Complete Cases
read.csv
{utils}
Read a csv file to data frame. Specify stringsAsFactors = FALSE to keep all string columns as characters
labs
{GGPLOT2}
Customise labels in GGPLOT2
sum
{base}
Get sum of numeric values or a vector
desc
{dplyr}
Arrange in descending order
cut
{base}
Convert Numeric to Factor
write.csv
{utils}
write a csv file to a data frame
theme_classic
{GGPLOT2}
A minimalistic theme with no gridlines
select
{dplyr}
Select columns from a tibble/data frame
mean
{base}
Get mean of a vector
data.frame
{base}
Create a data.frame from vectors
slice
{dplyr}
Subset rows using their positions
separate
{dplyr}
Separate a character column into multiple columns
scale_x_continuous
{GGPLOT2}
Customise continuous x axis
aes
{GGPLOT2}
Construct aesthetic mapping of a ggplot graph
as.numeric
{base}
Coerce a vector to numeric
The end!